package base

import (
	"github.com/gin-gonic/gin"
	"go-api-template/api/http"
	"go-api-template/api/http/base"
	"go-api-template/api/http/v1/base/system"
	"go-api-template/api/router/base/t"
)

func SetRouter(r *gin.RouterGroup) {
	rg := r.Group("/base")

	rg.GET(`/status`, http.Handle(&base.StatusReq{}))
	rg.GET(`/system/status`, http.Handle(&system.StatusReq{}))
	rg.POST("/createSortLink", http.Handle(&base.CreateSortLinkReq{}))
	rg.POST("/sendCaptcha", http.Handle(&base.SendCaptchaReq{}))
	rg.POST("/login", http.Handle(&base.LoginReq{}))
	rg.GET("/current", http.Handle(&base.CurrentReq{}))

	t.SetRouter(rg)
}
